import Layout from '../views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV);
const AppComponent = {
  template: "<router-view/>"
};
export default {
  path: '/activity',
  name: 'activity',
  component: Layout,
  meta: {
    title: '活动管理',
    icon: 'icon'
  },
  children: [{
      path: "/luckDraw",
      component: AppComponent,
      name: "luckDraw",
      redirect: "/bizhibo-anchor/list",
      meta: {
        title: "幸运抽奖"
      },
      children: [{
          path: "luckDrawIndex/index",
          name: "luckDrawIndex",
          component: _import("activity/luckDraw/index"),
          meta: {
            title: "抽奖",
            buttons: {
              open: {
                label: '是否启用',
                enabled: true
              },
              edit: {
                label: '编辑/新增',
                enabled: true
              },
              record: {
                label: '奖励记录',
                enabled: true
              },
              del: {
                label: '删除',
                enabled: true
              },
            }
          }
        },
        {
          path: "luckDrawIndex/edit",
          name: "luckDrawIndexEdit",
          component: _import("activity/luckDraw/edit"),
          meta: {
            title: "编辑"
          },
          hidden: true,
        },
        {
          path: "luckDrawIndex/recored",
          name: "luckDrawIndexRecord",
          component: _import("activity/luckDraw/rewardRecord"),
          meta: {
            title: "奖励记录"
          },
          hidden: true,
        },
      ]
    },
    {
      path: "/freeCollection",
      component: AppComponent,
      name: "freeCollection",
      redirect: "/activity/freeCollection/index",
      meta: {
        title: "免费领取活动"
      },
      children: [{
          path: "freeCollection/index",
          name: "freeCollection",
          component: _import("activity/freeCollection/index"),
          meta: {
            title: "免费领取活动",
            buttons: {
              add: {
                label: '新增活动',
                enabled: true
              },
              setup: {
                label: '设置',
                enabled: true
              },
              edit: {
                label: '编辑',
                enabled: true
              },
              see: {
                label: '查看',
                enabled: true
              },
            }
          }
        },
        {
          path: "freeCollection/add",
          name: "freeCollectionAdd",
          component: _import("activity/freeCollection/add"),
          meta: {
            title: "新增",
            index: '/freeCollection/freeCollection/index'
          },
          hidden: true,
        },
      ]
    },
    {
      path: "/activity/lowPriceBuy",
      component: AppComponent,
      name: "lowPriceBuyList",
      redirect: "/activity/lowPriceBuy/index",
      meta: {
        title: "低价购"
      },
      children: [{
          path: "index",
          name: "lowPriceBuy",
          component: _import("activity/lowPriceBuy/index"),
          meta: {
            title: "低价购",
            buttons: {
              add: {
                label: '新增活动',
                enabled: true
              },
              setup: {
                label: '设置',
                enabled: true
              },
              edit: {
                label: '编辑',
                enabled: true
              },
              see: {
                label: '查看',
                enabled: true
              },
            }
          }
        },
        {
          path: "add",
          name: "lowPriceBuyAdd",
          component: _import("activity/lowPriceBuy/add"),
          meta: {
            title: "新增",
            index: '/activity/lowPriceBuy/index'
          },
          hidden: true,
        },
      ]
    },
    {
      path: 'seckill',
      component: _import('activity/seckill/list'),
      name: 'activitySecKill',
      meta: {
        title: '秒杀配置',
        // noCache: false,
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          },
          operate: {
            label: '开启/关闭',
            enabled: true
          },
          goodsList: {
            label: '商品管理',
            enabled: true
          }
        }
      },
    },
    {
      path: 'signIn',
      component: _import('activity/signIn/index'),
      name: 'signIn',
      meta: {
        title: '签到管理',
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          },
          view: {
            label: '查看',
            enabled: true
          },
          stop: {
            label: '停止',
            enabled: true
          },
          copy: {
            label: '复制',
            enabled: true
          }
        }
      }
    },
    {
      path: 'coupon',
      component: _import('activity/coupon/list'),
      name: 'activityCoupon',
      meta: {
        title: '优惠券管理',
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          },
          view: {
            label: '查看',
            enabled: true
          },
          operate: {
            label: '开启/停止',
            enabled: true
          },
          disable: {
            label: '作废',
            enabled: true
          },
          record: {
            label: '领取记录',
            enabled: true
          },
          set: {
            label: '全局设置',
            enabled: true
          },
          statistics: {
            label: '活动统计',
            enabled: true
          },
          selectUser: {
            label: '选择用户',
            enabled: true
          },
          batchImport: {
            label: '批量导入',
            enabled: true
          },
        }
      }
    },
    {
      path: 'h5',
      component: _import('activity/h5/list'),
      name: 'activityH5',
      meta: {
        title: 'h5专题活动',
        // noCache: true,
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          }
        }
      }
    },
    {
      path: 'h5/add',
      component: _import('activity/h5/detail'),
      name: 'activityH5Add',
      meta: {
        title: '新增h5专题活动',
        index: '/activity/h5'
      },
      props: true,
      hidden: true
    },
    {
      path: 'h5/edit',
      component: _import('activity/h5/detail'),
      name: 'activityH5Edit',
      meta: {
        title: '编辑h5专题活动',
        noCache: true,
        index: '/activity/h5'
      },
      props: true,
      hidden: true
    },
    {
      path: 'groupBooking',
      component: _import('activity/groupBooking/list'),
      name: 'groupBooking',
      meta: {
        title: '拼团配置',
        // noCache: true,
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          },
          /* view: { label: '查看', enabled: true },
          disable: { label: '使失效', enabled: true } */
        }
      }
    },
    {
      path: 'fullReduce/list',
      component: _import('activity/fullReduce/index'),
      name: 'fullReduce',
      meta: {
        title: '满减赠',
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          },
          disable: {
            label: '使失效',
            enabled: true
          }
        }
      },
      props: true
    },
    {
      path: 'fullReduce/add',
      component: _import('activity/fullReduce/edit'),
      name: 'fullReduceAdd',
      meta: {
        title: '新增满减赠',
        noCache: true
      },
      hidden: true,
      props: true
    },
    {
      path: 'fullReduce/view',
      component: _import('activity/fullReduce/edit'),
      name: 'fullReduceView',
      meta: {
        title: '查看满减',
        noCache: true
      },
      hidden: true,
      props: true
    },
    {
      path: 'fullReduce/edit',
      component: _import('activity/fullReduce/edit'),
      name: 'fullReduceEdit',
      meta: {
        title: '满减编辑',
        noCache: true
      },
      hidden: true,
      props: true
    },
    {
      path: 'packetRain',
      component: _import('activity/packetRain/index'),
      name: 'packetRain',
      meta: {
        title: '红包雨活动',
        buttons: {
          add: {
            label: '新建',
            enabled: true
          },
          edit: {
            label: '编辑',
            enabled: true
          },
          bgEdit: {
            label: '编辑活动背景',
            enabled: true
          },
          record: {
            label: '活动记录',
            enabled: true
          }
        }
      },
    },
    {
      path: 'packetRain/edit',
      component: _import('activity/packetRain/edit'),
      name: 'packetRainEdit',
      meta: {
        title: '红包雨编辑'
      },
      hidden: true,
    },
    {
      path: 'packetRain/add',
      component: _import('activity/packetRain/edit'),
      name: 'packetRainAdd',
      meta: {
        title: '新建红包雨活动'
      },
      hidden: true,
    },
    {
      path: 'packetRain/Record',
      component: _import('activity/packetRain/doneRecord'),
      name: 'packetRainRecord',
      meta: {
        title: '红包雨活动记录'
      },
      hidden: true,
    },
    // {
    //   path: "/rankAward",
    //   component: AppComponent,
    //   name: "rankAward",
    //   meta: {
    //     title: "排行奖励"
    //   },
    //   children: [{
    //     path: "rankAward/edit",
    //     name: "rankAwardEdit",
    //     component: _import("activity/rankAward/edit"),
    //     meta: {
    //       title: "编辑",
    //       buttons: {
    //         setStar: {
    //           label: '设置明星主播',
    //           enabled: true
    //         }
    //       }
    //     }
    //   }, {
    //     path: "rankAward/rewardRecord",
    //     name: "rankAwardRewardRecord",
    //     component: _import("activity/rankAward/rewardRecord"),
    //     meta: {
    //       title: "奖励记录",
    //       buttons: {
    //         setStar: {
    //           label: '设置明星主播',
    //           enabled: true
    //         }
    //       }
    //     }
    //   }]
    // },
    {
      path: 'salesRank',
      component: _import('activity/salesRank/list'),
      name: 'salesRank',
      meta: {
        title: '销售排行榜',
        buttons: {
          edit: {
            label: '修改',
            enabled: true
          }
        }
      },
    },
    {
      path: 'seckill/goods/:id',
      component: _import('activity/seckill/goods/list'),
      name: 'activitySecKillGoodsList',
      meta: {
        title: '管理秒杀商品',
        index: '/activity/seckill',
        noCache: true
      },
      props: true,
      hidden: true
    },
    {
      path: 'coupon/add',
      component: _import('activity/coupon/edit'),
      name: 'activityCouponAdd',
      meta: {
        title: '优惠券添加',
        index: '/activity/coupon'
      },
      hidden: true
    },
    {
      path: 'coupon/detail/:type/:id',
      component: _import('activity/coupon/edit'),
      name: 'activityCouponEdit',
      meta: {
        title: '优惠券编辑',
        noCache: true,
        index: '/activity/coupon'
      },
      hidden: true,
      props: true
    },
    {
      path: 'coupon/detail/:type/:id',
      component: _import('activity/coupon/edit'),
      name: 'activityCouponView',
      meta: {
        title: '优惠券查看',
        noCache: true,
        index: '/activity/coupon'
      },
      hidden: true,
      props: true
    },
    {
      path: 'coupon/statistics/:id',
      component: _import('activity/coupon/statistics'),
      name: 'activityCouponStatistics',
      meta: {
        title: '活动统计',
        index: '/activity/coupon'
      },
      hidden: true,
      props: true
    },
    {
      path: 'coupon/record',
      component: _import('activity/coupon/record'),
      name: 'activityCouponRecord',
      meta: {
        title: '领取记录',
        index: '/activity/coupon'
      },
      hidden: true
    },
    // {
    //   path: 'quality',
    //   component: _import('activity/quality/list'),
    //   name: 'activityQuality',
    //   meta: {
    //     title: '碧选精品',
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       edit: { label: '编辑', enabled: true },
    //       operate: { label: '开启/关闭', enabled: true }
    //     }
    //   },
    // },
    // {
    //   path: 'member',
    //   component: _import('activity/member/list'),
    //   name: 'activityMember',
    //   meta: {
    //     title: '会员专享',
    //     // noCache: false,
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       edit: { label: '编辑', enabled: true },
    //       operate: { label: '开启/关闭', enabled: true },
    //       goodsList: { label: '商品管理', enabled: true }
    //     }
    //   },
    // },
    // {
    //   path: 'defaultFixed',
    //   component: _import('activity/defaultFixed/index'),
    //   name: 'defaultFixed',
    //   meta: {
    //     title: '固定默认页面',
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       edit: { label: '编辑', enabled: true }
    //     }
    //   },
    // },
    // {
    //   path: 'defaultFixedAdd',
    //   component: _import('activity/defaultFixed/edit'),
    //   name: 'defaultFixedAdd',
    //   meta: {
    //     title: '新建默认页面'
    //   },
    //   hidden: true,
    //   props: true
    // },
    // {
    //   path: 'defaultFixedEdit/:row',
    //   component: _import('activity/defaultFixed/edit'),
    //   name: 'defaultFixedEdit',
    //   meta: {title: '编辑默认页面'},
    //   hidden: true,
    //   props: true
    // },
    // {
    //   path: 'members/goods/:id',
    //   component: _import('activity/member/goods/list'),
    //   name: 'activityMemberGoodsList',
    //   meta: {
    //     title: '管理会员专享商品',
    //     index: '/activity/member',
    //     noCache: true
    //   },
    //   props: true,
    //   hidden: true
    // },
    // {
    //   path: 'combination',
    //   component: _import('activity/combination/index'),
    //   name: 'combination',
    //   meta: {
    //     title: '组合套餐',
    //     // noCache: true,
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       view: { label: '查看', enabled: true },
    //       edit: { label: '编辑', enabled: true },
    //       operate: { label: '上架/下架', enabled: true }
    //     }
    //   },
    // },
    // {
    //   path: 'combinationAdd',
    //   component: _import('activity/combination/edit'),
    //   name: 'combinationAdd',
    //   meta: {
    //     title: '组合新建',
    //     noCache: true
    //   },
    //   hidden: true,
    //   props: true
    // },
    // {
    //   path: 'combinationEdit/:id',
    //   component: _import('activity/combination/edit'),
    //   name: 'combinationEdit',
    //   meta: {title: '组合编辑'},
    //   hidden: true,
    //   props: true
    // },
    // {
    //   path: 'combinationView/:id',
    //   component: _import('activity/combination/edit'),
    //   name: 'combinationView',
    //   meta: {title: '查看组合'},
    //   hidden: true,
    //   props: true
    // },
    // {
    //   path: 'package',
    //   component: _import('activity/package/list'),
    //   name: 'activityPackage',
    //   meta: {
    //     title: '商品套餐',
    //     buttons: {
    //       add: {
    //         label: '新建',
    //         enabled: true
    //       },
    //       edit: {
    //         label: '编辑',
    //         enabled: true
    //       },
    //       view: {
    //         label: '查看',
    //         enabled: true
    //       },
    //       export: {
    //         label: '导出',
    //         enabled: true
    //       }
    //     }
    //   },
    // },
    {
      path: 'package/add',
      component: _import('activity/package/edit'),
      name: 'activityPackageAdd',
      meta: {
        title: '商品套餐添加',
        index: '/activity/package'
      },
      hidden: true
    },
    {
      path: 'package/edit/:id',
      component: _import('activity/package/edit'),
      name: 'activityPackageEdit',
      meta: {
        title: '商品套餐编辑',
        noCache: true,
        index: '/activity/package'
      },
      props: true,
      hidden: true
    },
    {
      path: 'package/view/:id',
      component: _import('activity/package/edit'),
      name: 'activityPackageView',
      meta: {
        title: '商品套餐查看',
        noCache: true,
        index: '/activity/package'
      },
      props: true,
      hidden: true
    },
    // {
    //   path: 'topic',
    //   component: _import('activity/topic/list'),
    //   name: 'activityTopic',
    //   meta: {
    //     title: '商品专题',
    //     buttons: {
    //       add: {
    //         label: '新建',
    //         enabled: true
    //       },
    //       edit: {
    //         label: '编辑',
    //         enabled: true
    //       },
    //       operate: {
    //         label: '启用/禁用',
    //         enabled: true
    //       },
    //       goodsList: {
    //         label: '商品管理',
    //         enabled: true
    //       }
    //     }
    //   },
    // },
    {
      path: 'topic/goods/:id',
      component: _import('activity/topic/goods/list'),
      name: 'activityTopicGoodsList',
      meta: {
        title: '管理专题商品',
        index: '/activity/topic'
      },
      props: true,
      hidden: true
    },
    // {
    //   path: 'partner',
    //   component: _import('activity/partner/list'),
    //   name: 'activityPartner',
    //   meta: {
    //     title: '城市合伙人',
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       edit: { label: '编辑', enabled: true }
    //     }
    //   }
    // },
    // {
    //   path: 'partner/add',
    //   component: _import('activity/partner/edit'),
    //   name: 'activityPartnerAdd',
    //   meta: {
    //     title: '城市合伙人添加',
    //     index: '/activity/partner'
    //   },
    //   hidden: true
    // },
    // {
    //   path: 'partner/edit/:id',
    //   component: _import('activity/partner/edit'),
    //   name: 'activityPartnerEdit',
    //   meta: {
    //     title: '城市合伙人编辑',
    //     noCache: true,
    //     index: '/activity/partner'
    //   },
    //   props: true,
    //   hidden: true
    // },
    // {
    //   path: 'newBuyer',
    //   component: _import('activity/newBuyer/index'),
    //   name: 'newBuyer',
    //   meta: {
    //     title: '用户专享商品管理',
    //     buttons: {
    //       goodsAdd: { label: '添加商品', enabled: true },
    //       packagesAdd: { label: '添加套餐', enabled: true },
    //       label: { label: '编辑标签', enabled: true },
    //       delete: { label: '移除', enabled: true }
    //     }
    //   }
    // },
    // {
    //   path: 'welfare',
    //   component: _import('activity/welfare/schedule/index'),
    //   name: 'welfareSchedule',
    //   meta: {
    //     title: '福利档期管理',
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       edit: { label: '编辑', enabled: true },
    //       operate: { label: '启用/禁用', enabled: true },
    //       goodsList: { label: '商品管理', enabled: true }
    //     }
    //   },
    // },
    // {
    //   path: 'welfare/:id/goods',
    //   component: _import('activity/welfare/goods/index'),
    //   name: 'welfareScheduleGoodsList',
    //   meta: {
    //     title: '档期商品管理',
    //     noCache: true,
    //     index: '/activity/welfare'
    //   },
    //   hidden: true,
    //   props: true
    // },
    // {
    //   path: 'activity',
    //   component: _import('activity/activityList/list'),
    //   name: 'activityActivity',
    //   meta: {
    //     title: '活动列表',
    //     buttons: {
    //       add: { label: '新建', enabled: true },
    //       edit: { label: '编辑', enabled: true },
    //       goods: { label: '管理活动商品', enabled: true },
    //       goodsSku: { label: '查看活动商品属性', enabled: true }
    //     }
    //   }
    // },
    // {
    //   path: 'activityActivityGoods',
    //   component: _import('activity/activityList/edit'),
    //   name: 'activityActivityGoods',
    //   meta: {
    //     title: '活动商品管理',
    //     noCache: true,
    //     buttons: {
    //       sku: { label: '查看活动商品属性', enabled: true }
    //     }
    //   },
    //   hidden: true
    // },
    // {
    //   path: 'goodsSku',
    //   component: _import('activity/activityList/goodsku'),
    //   meta: {title: '商品属性', noCache: true},
    //   name: 'activityActivityGoodsSku',
    //   hidden: true
    // },
    // {
    //   path: 'lotteryRecord',
    //   component: _import('activity/lottery/lotteryRecord'),
    //   name: 'lotteryRecord',
    //   meta: {title: '抽奖记录'}
    // },
    {
      path: 'groupBooking/add',
      component: _import('activity/groupBooking/edit'),
      name: 'groupBookingAdd',
      meta: {
        title: '拼团新建',
        index: '/activity/coupon'
      },
      hidden: true
    },
    {
      path: 'groupBooking/detail/:type/:id',
      component: _import('activity/groupBooking/edit'),
      name: 'groupBookingEdit',
      meta: {
        title: '拼团编辑',
        noCache: true,
        index: '/activity/groupBooking'
      },
      hidden: true,
      props: true
    },
    {
      path: 'groupBooking/detail/:type/:id',
      component: _import('activity/groupBooking/edit'),
      name: 'groupBookingView',
      meta: {
        title: '拼团查看',
        noCache: true,
        index: '/activity/groupBooking'
      },
      hidden: true,
      props: true
    },
    {
      path: 'signInRule/:activitySignInId/add',
      component: _import('activity/signIn/ruleEdit'),
      name: 'signInAdd',
      meta: {
        title: '新建签到规则',
        index: '/activity/signIn'
      },
      hidden: true,
      props: true
    },
    {
      path: 'signInRule/edit/:activitySignInId/:id',
      component: _import('activity/signIn/ruleEdit'),
      name: 'signInEdit',
      meta: {
        title: '签到规则编辑',
        noCache: true,
        index: '/activity/signIn'
      },
      hidden: true,
      props: true
    },
    {
      path: 'signInRule/detail/:activitySignInId/:id',
      component: _import('activity/signIn/ruleEdit'),
      name: 'signInView',
      meta: {
        title: '查看签到规则',
        noCache: true,
        index: '/activity/signIn'
      },
      hidden: true,
      props: true
    }
  ]
}
